import http from "@/utils/request/httpRequest.ts";
import type { ScoreListType } from "@/types/scoreType.ts";
import outHttp from "@/utils/request/httpOutRequest.ts";

// 添加
export const standardAdd = (data: {
    name: string
}) => http.post("standard/add", data);

//修改
export const standardUpdate = (data: {
    id: string,
    name: string
}) => http.post("standard/update", data);

// 删除
export const standardDelete = (id: string) => http.post("standard/deleteById", { id });

// 列表
export const standardList = (data: {}) => http.get<ScoreListType[]>("standard/getStandardList", {
    params: data
});

export const standardListOut = (data: {}) => outHttp.get<ScoreListType[]>("standard/getStandardList", {
    params: data
});


// 获取总分
export const getSum = (data: {}) => http.get("standard/totalScore", {
    params: data
})